<template>
    <div>
        <!--        <input :value="value" :checked="checked" @change="changeFn" type="checkbox">-->
        <input :value="value" v-model="proxyChange" type="checkbox">
    </div>
</template>

<script>
import Son from "@/components/Son.vue";

export default {
    name: "Child",
    components: {
        Son
    },
    props: {
        checked: {   // 是skill
            type: [Array, Boolean],
            default: true
        }, // 注意,
        value: String
    },
    model: {
        prop: "checked",
        event: "change"
    },
    computed: {
        proxyChange: {
            get() {
                return this.checked
            },
            set(v) {
                // console.log(v)
                this.$emit("change", v)
            }
        }
    },
    methods: {
        // changeFn() {
        //     console.log(this)
        //     console.log(this.value)
        //     this.$emit("change", this.checked)
        // }
    }
}
</script>